package com.xinghou.platform.dao.main;

import com.xinghou.platform.entity.req.ListReq;
import com.xinghou.platform.model.main.Store;
import com.xinghou.platform.model.main.StoreStatistics;
import com.xinghou.platform.model.main.WaitStore;
import org.springframework.dao.DataAccessException;

import java.util.List;
import java.util.Map;

/**
 * @author liuwei.wen
 */
public interface StoreDAO {

    public Store getStoreBystoreId(Integer storeId) throws DataAccessException;

    public int addStore(Store store) throws DataAccessException;

    public int updateStore(Store store) throws DataAccessException;

    public int delStore(Store store) throws DataAccessException;

    public int saveStore(Store store) throws DataAccessException;



    public List<String> getStoreInfoList(String key, String frompage) throws DataAccessException;

    public List<String> getStoreNames(String key, String frompage) throws DataAccessException;

    public List<String> getStoreInfoLists(String key, String frompage) throws DataAccessException;

    public List<Store> getStoreInfoListnum(String key) throws DataAccessException;

    public List<Store> getStoreList() throws DataAccessException;

    public List<Store> getStoreListbyname(String key, String frompage) throws DataAccessException;

    public List<Integer> getStoreInfoLists(List<Integer> storeids) throws DataAccessException;

    public List<Store> getStoreList(int storeid, int page) throws DataAccessException;

    public List<Store> getStoreListbyname(String key, String frompage, String shopid, String cityid) throws DataAccessException;

    public Integer getBranchStoreCount(String key, String shopid, String cityid) throws DataAccessException;

    public Store getStoreBystoreName(String storeName) throws DataAccessException;

    public List<Store> getStoreListByName(String name, String cityid, String address) throws DataAccessException;

    public List<Store> getStoreListbynameforsharecard(String key) throws DataAccessException;

    public List<Store> getByUserId(int userId, int limit);

    public List<Store> list(Map<String, Object> map);

    public Store get(int id);

    public int save(Map<String, Object> map);

    public void addWaitStore(WaitStore waitStore);

    public StoreStatistics getStoreStatistics(Integer id);

    public void addStoreStatistics(StoreStatistics storeStatustics);

    public void addShareCountStatstics(Integer storeid);
    public void reduceShareCountStatstics(Integer storeid);

    public List<Store> storeList(ListReq listReq);


}
